package ecweb.dao;

import java.util.List;

import ecweb.dal.DatabaseSession;
import ecweb.domain.CartItem;
import ecweb.exception.DatabaseException;

public interface ICartDao {
	
	void add(DatabaseSession dbses, long userId, long goodId, int quantity)
			throws DatabaseException;
	
	void delete(DatabaseSession dbses, long userId, long goodId)
			throws DatabaseException;
	
	void updateQuantity(DatabaseSession dbses, long userId, long goodId, int quantity)
			throws DatabaseException;
	
	int getQuantity(DatabaseSession dbses, long userId, long goodId)
			throws DatabaseException;
	/*
	boolean addQuantity(DatabaseSession dbses, long userId, long goodId, int quantityToAdd)
			throws DatabaseException;
	
	boolean subQuantity(DatabaseSession dbses, long userId, long goodId, int quantityToSub)
			throws DatabaseException;
	*/
	
	List<CartItem> getCartItems(DatabaseSession dbses, long userIdFilter,
			long limitStart, long limitLength)
					throws DatabaseException;
	
	long getCartItemsCount(DatabaseSession dbses, long userIdFilter)
			throws DatabaseException;
	
}
